// 	ID : pallab81
// 	PROG : 10721
// 	LANG : C++
// 	2011-08-21-12.47.52 Sunday
//
// 	"I have not failed, I have just found 10000 ways that won't work.
//


#include <iostream>
#include <algorithm>
#include <vector>
#include <sstream>
#include <fstream>
#include <string>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <functional>
#include <bitset>

#include <ctime>
#include <cassert>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <climits>
#include <cstring>

using namespace std;

#define CI( x ) scanf("%d",&x)
#define CL( x ) scanf("%lld",&x)
#define CD( x ) scanf("%lf",&x )
#define fo(i,ed) for(int i = 0 ; i < ed ; ++i )
#define foit(i, x) for (typeof((x).begin()) i = (x).begin(); i != (x).end(); i++)
#define bip system("pause")
#define Int long long
#define pb push_back
#define SZ(X) (int)(X).size()
#define LN(X) (int)(X).length()
#define mk make_pair
#define f first
#define s second
#define SET( ARRAY , VALUE ) memset( ARRAY , VALUE , sizeof(ARRAY) )

inline void wait( double seconds ) {
    double endtime = clock() + ( seconds+ CLOCKS_PER_SEC );
    while( clock() < endtime ) {
        ;
    }
}
int n,k,m;
Int cando[55][55][55];

inline Int go(int N, int K, int M) {
    if( N==0 && K==0 ) {
        return 1;
    }
    if( N==0 || K==0 ) {
        return 0;
    }
    Int &ways = cando[ N ][ K ][ M ];
    if( ways!=-1 ) {
        return ways;
    }
    ways=0;
    for(int i=1; i<=M; ++i) {
        if( N-i <0 )continue;
        if( K-1 <0 )continue;
        ways+=go(N-i,K-1,M);
    }

    return ways;
}

inline void Proc() {
    SET( cando, -1 );
    printf("%lld\n",go(n,k,m));
}
int main() {
#ifndef ONLINE_JUDGE
    freopen("in.txt","rt",stdin);
#endif

    while( scanf("%d %d %d",&n,&k,&m)==3 ) {
        Proc();
    }
    return 0;
}
